package com.zhongxia.feign;

import com.zhongxia.entity.Menu;
import com.zhongxia.entity.MenuVO;
import com.zhongxia.entity.Type;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: 废柴弟弟
 * @Date: 2020/3/30 19:19
 */
@FeignClient(value="menu")
public interface MenuFeign {
    @GetMapping("/menu/findAll/{index}/{limit}")
    public MenuVO findAll(@PathVariable("index") int index, @PathVariable("limit") int limit);
    @GetMapping("/menu/count")
    public int count();
    @DeleteMapping("/menu/deleteById/{id}")
    public void deleteById(@PathVariable("id") int id);
    @GetMapping("/menu/findType")
    public List<Type> findType();
    @PostMapping("/menu/save")
    public void save(Menu menu);
    @PutMapping("/menu/update")
    public void update(Menu menu);
    @GetMapping("/menu/findById/{id}")
    public Menu findById(@PathVariable("id") int id);
}
